create  table jms_dm.dm_center_stop_time_detail_dt  (
    date_time  date COMMENT '日期',
    waybill_no varchar(100)  COMMENT '运单号',
    send_shipment_no varchar(100)  COMMENT 't任务单',
    center_name varchar(100)  COMMENT 't中心名称',
    center_name_code varchar(100)  COMMENT 't中心编码',
    center_arrival_time datetime COMMENT 't中心到达时间',
    center_send_time datetime COMMENT 't中心发件时间',
    center_last_time datetime COMMENT 't中心发车时间',
    send_next_name varchar(100)  COMMENT 't下一站名称',
    next_type varchar(100)  COMMENT 't下一站是否为中心',
    diff_time decimal(10,4) COMMENT 't停留时间',
    invalid_type varchar(100)  COMMENT '无效类型',
    stop_type bigint COMMENT '明细类型'
     )
 ENGINE=OLAP
DUPLICATE KEY(date_time,waybill_no)
COMMENT "中心停留时长明细表"
PARTITION BY RANGE (date_time) (
    START ("2022-07-01") END ("2022-09-30") EVERY (INTERVAL 1 day)
)
DISTRIBUTED BY HASH(date_time,waybill_no) BUCKETS 4
PROPERTIES (
"replication_num" = "3",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.start" = "-365",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "4",
"in_memory" = "false",
"storage_format" = "V2"
);